package java基础知识.集合.list;

import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author coderFu
 * @create 2022/3/10
 */
public class CoderCopyOnWrite {


    public static void main(String[] args) {
        List<String> list = new ArrayList<>();

        List<String> list1 = Collections.synchronizedList(list);
        CopyOnWriteArrayList<String> list2 = new CopyOnWriteArrayList<>();

        list2.add("a");
        list2.add("b");
        System.out.println(list1);
    }


}
